/* 
* @Author: obsidian
* @Date:   2015-12-15 19:55:53
* @Last Modified by:   obsidian
* @Last Modified time: 2016-01-30 08:39:47
*/

#ifndef BRAKE_H
#include "stm32f10x_tim.h"

struct Brake
{
    unsigned short          *CCRx;
    unsigned char           status;
    unsigned short          stop_value;
    float                   midvalue0;
	float 					midvalue1;
    short                   limit;
    float                   ratio;
    unsigned short          second; 
    float                   angle;
    unsigned char           brake_flag;
    void                    (*init)();
    void                    (*read_from_sd)();
    void                    (*control)(float y,int distance_of_bigcar);
    void                    (*set_ccr)(short ccr);
    void                    (*save)();
};


extern struct Brake brake;
extern char ok_flag;
#define BRAKE_H
#endif
